package com.ztjc.day03_sqlite.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by pro on 15/10/8.
 */
public class PersonOpenHelper extends SQLiteOpenHelper {

    private static final String DB_NAME = "PERSON.DB";
    private static final int DB_VERSION = 1;

    public PersonOpenHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("create table person(_id Integer primary key autoincrement, name varchar(20), salary varchar(20), phone varchar(20))");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
